<DLOG resource ID> is the resource ID of the DLOG template;
<prompt string> consists of the dialog's text string;
<default buttom BOOLEAN> describes whether a button is to be outlined with black and thus be the default button. (The default button can be selected by typing RETURN or ENTER in addition to clicking on it). This parameter must be either TRUE or FALSE;
The last two parameters are OPTIONAL. They are:
<top coord> and <left coord> are used to set the top,left coordinates for placing the dialog. If these two parameters are omitted, the dialog will be centered within the card window.
-- part contents for background part 17
----- text -----
Creating the resources for ShowDialog XCMD Type 1:
The requirements for creating DLOG templates for Type 1 of ShowDialog XCMD with ResEdit are:
For "standard" dialogs and alerts the procID should be 1 (this describes how the dialog will "look"), the visible and goAwayFlag boxes must be unchecked, and the DLOG and associated DITL resources should be made purgeable.
If you are going to have a default button, it MUST be DITL item #1. This is because the first item in the item list is always assumed to be the default button. The Macintosh Toolbox will interpret a press of the Return or Enter key as equivalent to a mouse click in the default button.
In your DITL template your field (of type Static Text) that will contain the prompt string must contain the placeholder "^0" (don't use the quotes; and that's a zero). Your text will be substituted here.
All items in the item list EXCEPT the buttons must be DISABLED.
For alert boxes, you should precede your call to the external with "beep 1." It is a Macintosh convention that alerts beep when they are displayed on the screen.
The item number clicked on will be returned in "the result". This is only true for ENABLED item numbers.
-- part contents for background part 30
----- text -----
13
-- part contents for background part 18
----- text -----
Type 1 of ShowDialog XCMD is used to create "standard" dialog and alert boxes that contain static text, icons, PICTs, and as many "regular" buttons as you want.
You can modify the static text field on the fly by specifying a text string in the parameter list.
You decide whether or not to have a default (outlined) button.
You can specify where on the screen to place the dialog, or you can allow it to automatically center itself within the card window.